package com.example.service;

import com.example.domain.Person;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jpa.repository.JpaRepository;


@CacheConfig(cacheNames = "persons")
public interface PersonRepository extends JpaRepository<Person, Long> {
    @Cacheable
    Boolean existsByIdNum(String id_num);

}